package com.art.sunflower.service;

import com.art.sunflower.exception.*;
import com.art.sunflower.pojo.Enroll;
import com.art.sunflower.pojo.Lay;
import com.art.sunflower.util.MyPageInfo;

import java.util.Map;

public interface ClassesService {
    int insertClasses(String classesName, int courseId, int teacherId, String startweek, String endweek, int truefee, int maxNum);

    int updateClasses(int id, String classesName, int courseId, int teacherId, String startweek, String endweek, int truefee, int maxNum);

    int deleteClasses(int id);

    Map<String, Object> selectOneClasses(int id);

    Map<String, Object> selectOneClasses2(int id);

    MyPageInfo listAllClasses(Integer pagenum, Integer pagesize) throws BusyException;

    MyPageInfo listAllClasses2(Integer pagenum, Integer pagesize);

    int updateOpenClasses(int id, String classesName, int courseId, int teacherId, String startweek, String endweek, int truefee, int maxNum);

    int addOpenClasses(String classesName, int courseId, int teacherId, String startweek, String endweek, int truefee, int maxNum);

    int deleteOpenClasses(int id);

    Map<String, Object> selectOneOpenClasses(int id);

    Map<String, Object> selectOneOpenClasses2(int id);

    MyPageInfo listAllOpenClasses(Integer pagenum, Integer pagesize) throws BusyException;

    MyPageInfo listAllOpenClasses2(Integer pagenum, Integer pagesize);

    Lay findClassesByTeacher(int teacherId, Integer pagenum, Integer pagesize);

    int openClasses(int id, int trueNum, int maxNum, boolean status);

    void enroll(Enroll enroll) throws EnableClassesException, EnrollMaxException, NullClassesException, InconformityEnrollException;

    Map<String, Object> getClasses(Integer id) throws NullClassesException;

}

